package com.wm.yigongfang.common.web;

import lombok.Getter;
import lombok.Setter;

/**
 * @author zhangPeng
 * @description
 * @date 2021/4/20 11:07
 */
@Getter
@Setter
public class Result<T> {
  /**
   * 状态码
   */
  private int code;
  /**
   *  返回信息
   */
  private String msg;
  /**
   *  返回数据
   */
  private T data;



  public Result() {
    this(-1);
  }

  public Result(int code) {
    this(code, "", null);
  }

  public Result(T data) {
    this(0, "", data);
  }

  public Result(int code, String msg) {
    this(code, msg, null);
  }


  public Result(int code, String msg, T data) {
    this.code = code;
    this.msg = msg;
    this.data = data;
  }
}
